/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package Simulation.Services.Common;

/**
 *
 * @author jcharle
 */

public final class Hmi 
{
    //Load the library
    static{System.loadLibrary("hmi");}
    
    private boolean IsConnected = false;

    //Native method declaration
    private native void setInt(String name, int value);
    private native void setFloat(String name, float value);
    private native void setBoolean(String name, boolean value);
    private native void setByte(String name, byte value);
    private native void setShort(String name, short value);
    private native void setString(String name, String value);
    
    private native int getInt(String name);
    private native float getFloat(String name);
    private native boolean getBoolean(String name);
    private native byte getByte(String name);
    private native short getShort(String name);
    private native String getString(String name);

    private native void establishConnection(int uid, String serveradd, boolean asServer);

    //Establish a connection either as the server or as a client
    public boolean EstablishConnection(int UniqueID, String IPAddr, String PortNum, boolean AsServer)
    {
        if (!IsConnected)
        {
            String Address = IPAddr + ":" + PortNum;
            System.out.println("Application Connecting to " + Address);
            establishConnection(UniqueID, Address, AsServer);
            return true;
        }
        else
        {
            return false;
        }
    }

    public Hmi() 
    {

    }     
    
    ////////////////////////////////////////////////////////////////////////
    //------------------------- COMMON CONTROLS --------------------------//   
    ////////////////////////////////////////////////////////////////////////
    //---------------- DRIVER ----------------    
    //----- Set -----
    public void setVehicleParkingBrakeSwitch(boolean Pressed){setBoolean("PARKING_BRAKE_ON_SW", Pressed);}  
    public void setVehicleEngineStartSwitch(boolean Pressed){setBoolean("MAIN_ENGINE_START_SW", Pressed);}
    public void setVehicleAcceleratorPosition(float Position){setFloat("DRIVERSMAINCONTROLS_ACCELENCODER", Position);}
    public void setVehicleGearboxSelection(byte Gear){setByte("GEARSELECTORBOX_SELECTION", Gear);}
    public void setVehicleMainBrakePosition(float Position){setFloat("DRIVERSMAINCONTROLS_MAINBRAKEENCODER", Position);}
    public void setVehicleSteeringPosition(float Position){setFloat("DRIVERSMAINCONTROLS_STEERINGENCODER", Position);}
    public void setDriversPeriscopeSwitch(boolean Pressed){setBoolean("DRIVERS_PERIS_SW", Pressed);}
    public void setVehicleSpeedometer(float value){setFloat("SPEEDOMETER", value);}
    public void setVehicleTachometer(float value){setFloat("TACHOMETER", value);}
    public void setVehicleFuelLevel(float value){setFloat("FUEL_GAUGE", value);}
    //----- Get -----
    public boolean getVehicleParkingBrakeSwitch(){return getBoolean("PARKING_BRAKE_ON_SW");}  
    public boolean getVehicleEngineStartSwitch(){return getBoolean("MAIN_ENGINE_START_SW");}
    public float getVehicleAcceleratorPosition(){return getFloat("DRIVERSMAINCONTROLS_ACCELENCODER");}
    public byte getVehicleGearboxSelection(){return getByte("GEARSELECTORBOX_SELECTION");}
    public float getVehicleMainBrakePosition(){return getFloat("DRIVERSMAINCONTROLS_MAINBRAKEENCODER");}
    public float getVehicleSteeringPosition(){return getFloat("DRIVERSMAINCONTROLS_STEERINGENCODER");}
    public boolean getDriversPeriscopeSwitch(){return getBoolean("DRIVERS_PERIS_SW");}
    public float getVehicleSpeedometer(){return getFloat("SPEEDOMETER");}
    public float getVehicleTachometer(){return getFloat("TACHOMETER");}
    public float getVehicleFuelLevel(){return getFloat("FUEL_GAUGE");}
    
    //---------------- COMMANDER ----------------   
    //----- Set -----
    public void setCdrIgViewSelect(byte Selection){setByte("GVS_CDR_IG_VIEW_SELECT", Selection);}
    public void setCdrViewX(byte Position){setByte("GVS_CDR_VIEW_XOUT", Position);}
    public void setCdrViewY(byte Position){setByte("GVS_CDR_VIEW_YOUT", Position);}
    //----- Get -----
    public byte getCdrIgViewSelect(){return getByte("GVS_CDR_IG_VIEW_SELECT");}
    public byte getCdrViewX(){return getByte("GVS_CDR_VIEW_XOUT");}
    public byte getCdrViewY(){return getByte("GVS_CDR_VIEW_YOUT");}
    
    //---------------- MISC ----------------    
    //----- Set -----
    public void setVehicleType(byte Type){setByte("GVS_VEHICLE_TYPE", Type);}
    public void setPlatformDamageState(byte State){setByte("PLATFORM_DAMAGE_STATE", State);}
    public void setPlatformHeading(int Heading){setInt("PLATFORM_HEADING", Heading);}
    public void set7_62RoundsRemaining(int Rounds){setInt("GVS_762_ROUNDS_REMAINING", Rounds);}
    public void setPlatformLocation(String Location){setString("PLATFORM_LOCATION", Location);}
    //----- Get -----
    public byte getVehicleType(){return getByte("GVS_VEHICLE_TYPE");}
    public byte getPlatformDamageState(){return getByte("PLATFORM_DAMAGE_STATE");}
    public int getPlatformHeading(){return getInt("PLATFORM_HEADING");}
    public int get7_62RoundsRemaining(){return getInt("GVS_762_ROUNDS_REMAINING");}
    public String getPlatformLocation(){return getString("PLATFORM_LOCATION");}


    ////////////////////////////////////////////////////////////////////////
    //------------------ CHALLENGER SPECIFIC CONTROLS --------------------//   
    ////////////////////////////////////////////////////////////////////////
    //---------------- DRIVER ----------------    
    //----- Set -----
    public void setCr2DriversMainEngineFuelSwitch(boolean Pressed){setBoolean("MAIN_ENGINE_FUEL_SW", Pressed);}
    public void setCr2DriversMainEnginePowerSwitch(boolean Pressed){setBoolean("MAIN_ENGINE_POWER_SW", Pressed);}
    //----- Get -----
    public boolean getCr2DriversMainEngineFuelSwitch(){return getBoolean("MAIN_ENGINE_FUEL_SW");}
    public boolean getCr2DriversMainEnginePowerSwitch(){return getBoolean("MAIN_ENGINE_POWER_SW");}
    
    //---------------- GUNNER ----------------   
    //----- Set -----
    public void setCr2GnrCtrlHandleX(float Value){setFloat("GUNNERSCONTROLHANDLES_XOUTPUT", Value);}  
    public void setCr2GnrCtrlHandleY(float Value){setFloat("GUNNERSCONTROLHANDLES_YOUTPUT", Value);}  
    public void setCr2GnrGunPositionIndicator(float Value){setFloat("GUNNERSGUN_POSITION_INDICATOR", Value);} 
    public void setCr2GnrCtrlHandleGun(boolean Pressed){setBoolean("GUNNERSCONTROLHANDLES_GUN", Pressed);}
    public void setCr2GnrCtrlHandleGrip(boolean Pressed){setBoolean("GUNNERSCONTROLHANDLES_GRIP", Pressed);}
    public void setCr2GnrCtrlHandleDayTi(boolean Pressed){setBoolean("GUNNERSCONTROLHANDLES_DAYTI", Pressed);}
    public void setCr2GnrCtrlHandleMagnification(boolean Pressed){setBoolean("GUNNERSCONTROLHANDLES_MAG", Pressed);}
    public void setCr2GnrCtrlHandleLaseAlay(byte Position){setByte("GUNNERSCONTROLHANDLES_LASEALAY", Position);}
    public void setCr2GnrCtrlHandleArmament(byte Position){setByte("GUNNERSCONTROLHANDLES_ARMAMENTSELECT", Position);}
    public void setCr2GnrCtrlPanelGceModeSwitch(byte State){setByte("GUNNERSCONTROLPANEL_GCEMODE", State);}
    public void setCr2GnrCtrlPanelGpsOnSwitch(boolean Pressed){setBoolean("GUNNERSCONTROLPANEL_GPSOFFON", Pressed);}
    public void setCr2GnrCtrlPanelGraticuleOnSwitch(boolean Pressed){setBoolean("GUNNERSCONTROLPANEL_GRATONOFF", Pressed);}
    public void setCr2GnrCtrlPanelTiPolarity(byte State){setByte("GUNNERSCONTROLPANEL_TIVIDEOPOLARITY", State);}
    public void setCr2GnrCtrlPanelGceStbyLed(boolean On){setBoolean("GUNNERSCONTROLPANEL_GCESTBYLED", On);}
    public void setCr2GnrCtrlPanelGceStabLed(boolean On){setBoolean("GUNNERSCONTROLPANEL_GCESTABLED", On);}
    public void setCr2GnrCtrlPanelGceTravLed(boolean On){setBoolean("GUNNERSCONTROLPANEL_GCETRAVLED", On);}
    //----- Get -----
    public float getCr2GnrCtrlHandleX(){return getFloat("GUNNERSCONTROLHANDLES_XOUTPUT");}  
    public float getCr2GnrCtrlHandleY(){return getFloat("GUNNERSCONTROLHANDLES_YOUTPUT");}  
    public float getCr2GnrGunPositionIndicator(){return getFloat("GUNNERSGUN_POSITION_INDICATOR");} 
    public boolean getCr2GnrCtrlHandleGun(){return getBoolean("GUNNERSCONTROLHANDLES_GUN");}
    public boolean getCr2GnrCtrlHandleGrip(){return getBoolean("GUNNERSCONTROLHANDLES_GRIP");}
    public boolean getCr2GnrCtrlHandleDayTi(){return getBoolean("GUNNERSCONTROLHANDLES_DAYTI");}
    public boolean getCr2GnrCtrlHandleMagnification(){return getBoolean("GUNNERSCONTROLHANDLES_MAG");}
    public byte getCr2GnrCtrlHandleLaseAlay(){return getByte("GUNNERSCONTROLHANDLES_LASEALAY");}
    public byte getCr2GnrCtrlHandleArmament(){return getByte("GUNNERSCONTROLHANDLES_ARMAMENTSELECT");}
    public byte getCr2GnrCtrlPanelGceModeSwitch(){return getByte("GUNNERSCONTROLPANEL_GCEMODE");}
    public boolean getCr2GnrCtrlPanelGpsOnSwitch(){return getBoolean("GUNNERSCONTROLPANEL_GPSOFFON");}
    public boolean getCr2GnrCtrlPanelGraticuleOnSwitch(){return getBoolean("GUNNERSCONTROLPANEL_GRATONOFF");}
    public byte getCr2GnrCtrlPanelTiPolarity(){return getByte("GUNNERSCONTROLPANEL_TIVIDEOPOLARITY");}
    public boolean getCr2GnrCtrlPanelGceStbyLed(){return getBoolean("GUNNERSCONTROLPANEL_GCESTBYLED");}
    public boolean getCr2GnrCtrlPanelGceStabLed(){return getBoolean("GUNNERSCONTROLPANEL_GCESTABLED");}
    public boolean getCr2GnrCtrlPanelGceTravLed(){return getBoolean("GUNNERSCONTROLPANEL_GCETRAVLED");}

    //---------------- COMMANDER ----------------   
    //----- Set -----
    public void setCr2CdrCtrlHandleX(float Value){setFloat("COMMANDERSCONTROLHANDLES_XOUTPUT", Value);}  
    public void setCr2CdrCtrlHandleY(float Value){setFloat("COMMANDERSCONTROLHANDLES_YOUTPUT", Value);}  
    public void setCr2CdrGunPositionIndicator(float Value){setFloat("COMMANDERSGUN_POSITION_INDICATOR", Value);} 
    public void setCr2CdrCtrlHandleGun(boolean Pressed){setBoolean("COMMANDERSCONTROLHANDLES_GUN", Pressed);}
    public void setCr2CdrCtrlHandleGrip(boolean Pressed){setBoolean("COMMANDERSCONTROLHANDLES_GRIP", Pressed);}
    public void setCr2CdrCtrlHandleDayTi(boolean Pressed){setBoolean("COMMANDERSCONTROLHANDLES_DAYTI", Pressed);}
    public void setCr2CdrCtrlHandleMagnification(boolean Pressed){setBoolean("COMMANDERSCONTROLHANDLES_MAG", Pressed);}
    public void setCr2CdrCtrlHandleLaseAlign(byte Position){setByte("COMMANDERSCONTROLHANDLES_LASEALIGN", Position);}
    public void setCr2CdrCtrlPanelArmament(byte Selected){setByte("COMMANDERSCONTROLPANEL_ARMAMENTSELECT", Selected);}
    public void setCr2CdrCtrlPanelGceModeSwitch(byte State){setByte("COMMANDERSCONTROLPANEL_GCEMODE", State);}
    public void setCr2CdrCtrlPanelCpsSwitch(boolean Pressed){setBoolean("COMMANDERSCONTROLPANEL_CPSINDEPSLAVE", Pressed);}
    public void setCr2CdrCtrlPanelCpsIndepSlave(byte State){setByte("COMMANDERSCONTROLPANEL_CPSINDEPSLAVE", State);}
    public void setCr2CdrCtrlPanelTiPolarity(byte State){setByte("COMMANDERSCONTROLPANEL_TIVIDEOPOLARITY", State);}
    public void setCr2CdrCtrlPanelTiPower(byte State){setByte("COMMANDERSCONTROLPANEL_TIOFFSTANDBYON", State);}
    public void setCr2CdrCpsHullAlignSwitch(boolean Pressed){setBoolean("COMMANDERS_CPSHULLALIGN", Pressed);}
    public void setCr2CdrAuxPanelFinSwitch(boolean Pressed){setBoolean("AUXPANELCMDR_FIN", Pressed);}
    public void setCr2CdrAuxPanelHeshSwitch(boolean Pressed){setBoolean("AUXPANELCMDR_HESH", Pressed);}
    public void setCr2CdrCtrlPanelGceStbyLed(boolean On){setBoolean("COMMANDERSCONTROLPANEL_GCESTBYLED", On);}
    public void setCr2CdrCtrlPanelGceStabLed(boolean On){setBoolean("COMMANDERSCONTROLPANEL_GCESTABLED", On);}
    public void setCr2CdrCtrlPanelGceTravLed(boolean On){setBoolean("COMMANDERSCONTROLPANEL_GCETRAVLED", On);}
    public void setCr2CdrCtrlPanelLaserOnLed(boolean On){setBoolean("COMMANDERSCONTROLPANEL_LASERONLED", On);}
    //----- Get -----
    public float getCr2CdrCtrlHandleX(){return getFloat("COMMANDERSCONTROLHANDLES_XOUTPUT");}  
    public float getCr2CdrCtrlHandleY(){return getFloat("COMMANDERSCONTROLHANDLES_YOUTPUT");}  
    public float getCr2CdrGunPositionIndicator(){return getFloat("COMMANDERSGUN_POSITION_INDICATOR");} 
    public boolean getCr2CdrCtrlHandleGun(){return getBoolean("COMMANDERSCONTROLHANDLES_GUN");}
    public boolean getCr2CdrCtrlHandleGrip(){return getBoolean("COMMANDERSCONTROLHANDLES_GRIP");}
    public boolean getCr2CdrCtrlHandleDayTi(){return getBoolean("COMMANDERSCONTROLHANDLES_DAYTI");}
    public boolean getCr2CdrCtrlHandleMagnification(){return getBoolean("COMMANDERSCONTROLHANDLES_MAG");}
    public byte getCr2CdrCtrlHandleLaseAlign(){return getByte("COMMANDERSCONTROLHANDLES_LASEALIGN");}
    public byte getCr2CdrCtrlPanelArmament(){return getByte("COMMANDERSCONTROLPANEL_ARMAMENTSELECT");}
    public byte getCr2CdrCtrlPanelGceModeSwitch(){return getByte("COMMANDERSCONTROLPANEL_GCEMODE");}
    public boolean getCr2CdrCtrlPanelCpsSwitch(){return getBoolean("COMMANDERSCONTROLPANEL_CPSINDEPSLAVE");}
    public byte getCr2CdrCtrlPanelCpsIndepSlave(){return getByte("COMMANDERSCONTROLPANEL_CPSINDEPSLAVE");}
    public byte getCr2CdrCtrlPanelTiPolarity(){return getByte("COMMANDERSCONTROLPANEL_TIVIDEOPOLARITY");}
    public byte getCr2CdrCtrlPanelTiPower(){return getByte("COMMANDERSCONTROLPANEL_TIOFFSTANDBYON");}
    public boolean getCr2CdrCpsHullAlignSwitch(){return getBoolean("COMMANDERS_CPSHULLALIGN");}
    public boolean getCr2CdrAuxPanelFinSwitch(){return getBoolean("AUXPANELCMDR_FIN");}
    public boolean getCr2CdrAuxPanelHeshSwitch(){return getBoolean("AUXPANELCMDR_HESH");}
    public boolean getCr2CdrCtrlPanelGceStbyLed(){return getBoolean("COMMANDERSCONTROLPANEL_GCESTBYLED");}
    public boolean getCr2CdrCtrlPanelGceStabLed(){return getBoolean("COMMANDERSCONTROLPANEL_GCESTABLED");}
    public boolean getCr2CdrCtrlPanelGceTravLed(){return getBoolean("COMMANDERSCONTROLPANEL_GCETRAVLED");}
    public boolean getCr2CdrCtrlPanelLaserOnLed(){return getBoolean("COMMANDERSCONTROLPANEL_LASERONLED");}

    //---------------- MISC ----------------   
    //----- Set -----
    public void setCr2LdrCtrlPanelHeshLamp(boolean On){setBoolean("LOADERSCONTROLPANEL_HESHLAMP", On);}
    public void setCr2LdrCtrlPanelFinLamp(boolean On){setBoolean("LOADERSCONTROLPANEL_FINLAMP", On);}
    public void setCr2LdrCtrlPanelSpareLamp(boolean On){setBoolean("LOADERSCONTROLPANEL_SPARELAMP", On);}
    public void setCr2FinRoundsRemaining(int Rounds){setInt("GVS_FIN_ROUNDS_REMAINING", Rounds);}
    public void setCr2HeshRoundsRemaining(int Rounds){setInt("GVS_HESH_ROUNDS_REMAINING", Rounds);}
    public void setCr2SmokeRoundsRemaining(int Rounds){setInt("GVS_SMOKE_ROUNDS_REMAINING", Rounds);}
    //----- Get -----
    public boolean getCr2LdrCtrlPanelHeshLamp(){return getBoolean("LOADERSCONTROLPANEL_HESHLAMP");}
    public boolean getCr2LdrCtrlPanelFinLamp(){return getBoolean("LOADERSCONTROLPANEL_FINLAMP");}
    public boolean getCr2LdrCtrlPanelSpareLamp(){return getBoolean("LOADERSCONTROLPANEL_SPARELAMP");}
    public int getCr2FinRoundsRemaining(){return getInt("GVS_FIN_ROUNDS_REMAINING");}
    public int getCr2HeshRoundsRemaining(){return getInt("GVS_HESH_ROUNDS_REMAINING");}
    public int getCr2SmokeRoundsRemaining(){return getInt("GVS_SMOKE_ROUNDS_REMAINING");}

    
    ////////////////////////////////////////////////////////////////////////
    //-------------------- WARRIOR SPECIFIC CONTROLS ---------------------//   
    ////////////////////////////////////////////////////////////////////////
    //---------------- GUNNER ----------------   
    //----- Set -----
    public void setWarriorGnrPwrTraverse(float Position){setFloat("WR_GNR_PWR_TRAV_DEMAND", Position);}  
    public void setWarriorElevationWheel(float Position){setFloat("WR_ELEV_WHEEL", Position);}  
    public void setWarriorElevationWheelFire(boolean Fire){setBoolean("WR_EW_FIRE", Fire);} 
    public void setWarriorGduMode(byte Mode){setByte("WR_CDU_MODE", Mode);}
    public void setWarriorGduPower(byte State){setByte("WR_CDU_POWER", State);}
    public void getWarriorGnrIgViewSelect(byte Selection){setByte("GVS_GNR_IG_VIEW_SELECT", Selection);}
    public void setWarriorGnrViewX(byte Position){setByte("GVS_GNR_VIEW_XOUT", Position);}
    public void setWarriorGnrViewY(byte Position){setByte("GVS_GNR_VIEW_YOUT", Position);}
    //----- Get -----
    public float getWarriorGnrPwrTraverse(){return getFloat("WR_GNR_PWR_TRAV_DEMAND");}  
    public float getWarriorElevationWheel(){return getFloat("WR_ELEV_WHEEL");}  
    public boolean getWarriorElevationWheelFire(){return getBoolean("WR_EW_FIRE");} 
    public byte getWarriorGduMode(){return getByte("WR_CDU_MODE");}
    public byte getWarriorGduPower(){return getByte("WR_CDU_POWER");}
    public byte getWarriorGnrIgViewSelect(){return getByte("GVS_GNR_IG_VIEW_SELECT");}
    public byte getWarriorGnrViewX(){return getByte("GVS_GNR_VIEW_XOUT");}
    public byte getWarriorGnrViewY(){return getByte("GVS_GNR_VIEW_YOUT");}
    
    //---------------- COMMANDER ----------------   
    //----- Set -----
    public void setWarriorCdrPwrTraverse(float Position){setFloat("WR_CDR_PWR_TRAV_DEMAND", Position);}  
    public void setWarriorCdrBgtiZoom(byte State){setByte("WR_CDR_BGTI_ZOOM", State);}
    public void setWarriorCdrX8Power(byte State){setByte("WR_CDR_GBTI_X8_POWER", State);}
    public void setWarriorCfpdPower(byte State){setByte("WR_CFPD_POWER", State);}
    public void setWarriorCfpdTiOverride(boolean Pressed){setBoolean("WR_HE_LOADED", Pressed);}
    public void setWarriorCfpdVidSource(byte Source){setByte("WR_CFPD_POWER", Source);}
    public void setWarriorCfpdAmmunition(boolean Pressed){setBoolean("WR_CFPD_POWER", Pressed);}
    public void setWarriorCfpdMagnification(boolean Pressed){setBoolean("WR_CFPD_POWER", Pressed);}
    public void setWarriorCfpdPolarity(boolean Pressed){setBoolean("WR_CFPD_POWER", Pressed);}
    public void setWarriorCduMode(byte Mode){setByte("WR_CDU_MODE", Mode);}
    public void setWarriorCduPower(byte State){setByte("WR_CDU_POWER", State);}
    public void setWarriorCapuAmmo(boolean Pressed){setBoolean("WR_CAPU_AMMO", Pressed);}
    //----- Get -----
    public float getWarriorCdrPwrTraverse(){return getFloat("WR_CDR_PWR_TRAV_DEMAND");}  
    public byte getWarriorCdrBgtiZoom(){return getByte("WR_CDR_BGTI_ZOOM");}
    public byte getWarriorCdrX8Power(){return getByte("WR_CDR_GBTI_X8_POWER");}
    public byte getWarriorCfpdPower(){return getByte("WR_CFPD_POWER");}
    public boolean getWarriorCfpdTiOverride(){return getBoolean("WR_HE_LOADED");}
    public byte getWarriorCfpdVidSource(){return getByte("WR_CFPD_POWER");}
    public boolean getWarriorCfpdAmmunition(){return getBoolean("WR_CFPD_POWER");}
    public boolean getWarriorCfpdMagnification(){return getBoolean("WR_CFPD_POWER");}
    public boolean getWarriorCfpdPolarity(){return getBoolean("WR_CFPD_POWER");}
    public byte getWarriorCduMode(){return getByte("WR_CDU_MODE");}
    public byte getWarriorCduPower(){return getByte("WR_CDU_POWER");}
    public boolean getWarriorCapuAmmo(){return getBoolean("WR_CAPU_AMMO");}

    //---------------- MISC ----------------   
    //----- Set -----
    public void setWarriorBgtiLaserFire(boolean Fire){setBoolean("WR_BGTI_LASER_FIRE", Fire);}  
    public void setWarriorWeaponSelect(byte Weapon){setByte("WR_WEAPON_SELECT", Weapon);}
    public void setWarriorTurretPositionIndicator(int Position){setInt("WR_TPI", Position);}  
    public void setWarriorApdsLoaded(boolean Loaded){setBoolean("WR_APDS_LOADED", Loaded);}
    public void setWarriorHeLoaded(boolean Loaded){setBoolean("WR_HE_LOADED", Loaded);}
    public void setWarriorRardenGcs(byte State){setByte("WR_RARDEN_GCS", State);}
    public void setWarriorGeleLaserFire(boolean Fire){setBoolean("WR_GELE_LASER_FIRE", Fire);}
    public void setWarriorPolarity(boolean Pressed){setBoolean("WR_CAPU_POLARITY", Pressed);}
    public void setWarriorMagnification(boolean Pressed){setBoolean("WR_CAPU_MAGNIFICATION", Pressed);}
    public void setWarriorTiPower(boolean Pressed){setBoolean("WR_CAPU_TI_POWER", Pressed);}
    public void setWarriorTiDay(boolean Pressed){setBoolean("WR_CAPU_TI_DAY", Pressed);}
    public void setWarriorGunElevation(float Elevation){setFloat("GUN_ELEVATION", Elevation);}
    public void setWarriorApRoundsRemaining(int Rounds){setInt("GVS_AP_ROUNDS_REMAINING", Rounds);}
    public void setWarriorHeRoundsRemaining(int Rounds){setInt("GVS_HE_ROUNDS_REMAINING", Rounds);}
    //----- Get -----
    public boolean getWarriorBgtiLaserFire(){return getBoolean("WR_BGTI_LASER_FIRE");}  
    public byte getWarriorWeaponSelect(){return getByte("WR_WEAPON_SELECT");}
    public int getWarriorTurretPositionIndicator(){return getInt("WR_TPI");}  
    public boolean getWarriorApdsLoaded(){return getBoolean("WR_APDS_LOADED");}
    public boolean getWarriorHeLoaded(){return getBoolean("WR_HE_LOADED");}
    public byte getWarriorRardenGcs(){return getByte("WR_RARDEN_GCS");}
    public boolean getWarriorGeleLaserFire(){return getBoolean("WR_GELE_LASER_FIRE");}
    public boolean getWarriorPolarity(){return getBoolean("WR_CAPU_POLARITY");}
    public boolean getWarriorMagnification(){return getBoolean("WR_CAPU_MAGNIFICATION");}
    public boolean getWarriorTiPower(){return getBoolean("WR_CAPU_TI_POWER");}
    public boolean getWarriorTiDay(){return getBoolean("WR_CAPU_TI_DAY");}
    public float setWarriorGunElevation(){return getFloat("GUN_ELEVATION");}
    public int getWarriorApRoundsRemaining(){return getInt("GVS_AP_ROUNDS_REMAINING");}
    public int getWarriorHeRoundsRemaining(){return getInt("GVS_HE_ROUNDS_REMAINING");}
       
}
